package demo0509;

import java.util.Arrays;

/**
 * 
 * @author 邰建�?
 * @version 1.0
 * 
 */
public class Calc {

	
	public int add(int a, int b) {
		int s=a+b;
	
		
      return s;
	}
	
	
	public static int add1(int a, int b) {
		int s=a+b;
	
		
      return s;
	}
	
	public String getString(String a,String b) {
		String s=a+b;
		return s;
	}
	
	public int[] getArray(int a,int b) {
		int[] x=new int[2];
		x[0]=a;
		x[1]=b;
		return x;
	}
	
	public int[] getArray1(int a,int b) {
		int[] x={a,b};
		
		return x;
	}
	
	public int[] getArray2(int a,int b) {
		//int[] x={a,b};
		
		return new int[] {a,b};
	}
	
	
	public String getStringArray1(String a,String b,String c,String d) {
		String [] x={a,b,c,d};
		Arrays.sort(x);
		String s=x[0]+x[1]+x[2]+x[3];
		return s;
	}
	
	public char[] getChar(String s) {
		char[] c=new char[2];
		c[0]=s.charAt(0);
		c[1]=s.charAt(s.length()-1);
		return c;
		
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	public static void main(String[] args) {
		
		  Calc calc=new Calc();
		  int sum =calc.add(4, 5);
		  
		  int sum1=Calc.add1(5, 6);
		  
		  
		  
		  System.out.println(calc.add(4, 5));
		  
		  int[]x=calc.getArray(5, 6); 
		  String s=calc.getStringArray1("04", "02", "02", "03");
		  if(s.equals("01020304")) {
			  System.out.println("ok");
		  }else {
			  System.out.println("fail");
		  }
		  
		  
		  
	}
	
	
}
